import time

def printTime(f):
    def inner():
        start=time.time()
        f()
        end = time.time()
        print('spend %s' %(end - start))
    return inner

@printTime
def foo():
    print("this is foo" )


foo()
#foo=printTime(foo)
foo()
